/*
 reading GWS 2.4G receiver
 2 Aug: to verify 3.3V GWS abvle to drive pulseIn on 3V arduino
 */
int ch1 = 46;
int ch2 = 47;
int ch3 = 48;
int ch4 = 49;
int ch5 = 50;
int ch6 = 51;
unsigned long D1, D2, D3, D4, D5, D6;

void setup() {
	pinMode(ch1, INPUT);
	pinMode(ch2, INPUT);
	pinMode(ch3, INPUT);
	pinMode(ch4, INPUT);
	pinMode(ch5, INPUT);
	pinMode(ch6, INPUT);
	Serial.begin(9600);
}

void loop() {
	D1 = pulseIn(ch1, HIGH);
	D2 = pulseIn(ch2, HIGH);
	D3 = pulseIn(ch3, HIGH);
	D4 = pulseIn(ch4, HIGH);
	D5 = pulseIn(ch5, HIGH);
	D6 = pulseIn(ch6, HIGH);
	Serial.print("ch1 = ");
	Serial.print(D1);
	Serial.print(", ch2 = ");
	Serial.print(D2);
	Serial.print(", ch3 = ");
	Serial.print(D3);
	Serial.print(", ch4 = ");
	Serial.print(D4);
	Serial.print(", ch5 = ");
	Serial.print(D5);
	Serial.print(", ch6 = ");
	Serial.println(D6);
	delay(500);
}
